[Unit]
Description=pgweb -- Web-based PostgreSQL database browser written in Go.
Documentation=https://github.com/sosedoff/pgweb
After=network.target

[Service]
Type=simple
PIDFile=/run/pgweb.pid
User={{ pgweb_username }}
ExecStart=/usr/local/bin/pgweb --sessions
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s

CPUQuota=10%
MemoryLimit=1G

[Install]
WantedBy=multi-user.target